﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using KeMei.Common;

/// <summary>
///FileHelper 的摘要说明
/// </summary>
public static class FileHelper
{
    /// <summary>
    /// 删除一个文件
    /// </summary>
    /// <param name="filePath"></param>
    /// <returns></returns>
    public static bool DeleteFile(string filePath)
    {
        bool result = false;

        try
        {
            if (!string.IsNullOrEmpty(filePath))
            {
                if (File.Exists(filePath))
                {
                    File.Delete(filePath);
                    result = true;
                }
            }
        }
        catch (IOException)
        { }

        return result;
    }
}